import http from "assets/api/http";

let baseUrl = 'http://localhost:8080';


export const postComment = (_comment) => {
    return http.requestPost("/portal/comment", _comment);
}


export const getCommentsByArticleId = (_id, _page, _size) => {
    if (process.client) {
        return http.requestGet("/portal/comment/list/" + _page + "/" + _size + "/" + _id);
    } else {
        return http.requestGet(baseUrl + "/portal/comment/list/" + _page + "/" + _size + "/" + _id);
    }
}